<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<base href="<%=basePath%>">

	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery.media.js"></script>
	<script type="text/javascript" src="js/jquery.mediadata.js"></script>
	
	<title>PDF预览</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<style>
	
		#sddm div a:hover {
			background: #49A3FF;
			color: #FFF
		}
	</style>

	<style type="text/css">
	body {
		margin: 0;
		padding: 0;
	}
	
	a {
		text-decoration: none;
	}
	
	#span1 {
		margin-top: 0;
	}
	</style>
	<script type="text/javascript">
		function getparam(){
	 		var query = location.search.substring(1);
	 		var values= query.split("&");
	 		var pdf_url ="";
	 		for(var i = 0; i < values.length; i++) {
		 		var pos = values[i].indexOf('=');
		 		if (pos == -1) continue;
		 		var paramname = values[i].substring(0,pos);
		 		var value = values[i].substring(pos+1);
		 		if(paramname == "pdf_url"){
		 			pdf_url = value;
		 			break;
		 		}
	 		}
	        
	 		var pathName = document.location.pathname;
	 	    var index = pathName.substr(1).indexOf("/");
	 	    var result = pathName.substr(0,index+2);
	 		//alert(result + decodeURI(pdf_url));
	 		// decodeURI(pdf_url)
	  		document.getElementById("pdf_ulr").href= result + pdf_url;
	  		$('a.media').media({width:1000, height:800});
	 		}
	</script>

</head>

<body onload = "getparam();">
	<a class="media" id="pdf_ulr" href="${pageContext.request.contextPath}/201905/统发工资转账通知书/201905_100001_中国共产党南京市委员会办公厅.pdf"></a>
</body>
</html>
